package com.feonix.blockchain.pojo;

import java.io.Serializable;

/**
 * 交易类
 */
public class Transaction implements Serializable {
    /**
     * 发送者
     */
    private String sender;
    /**
     * 接收者
     */
    private String recipient;
    /**
     * 交易金额
     */
    private long amount;

    public Transaction() {
    }

    public Transaction(String sender, String recipient, long amount) {
        this.sender = sender;
        this.recipient = recipient;
        this.amount = amount;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getRecipient() {
        return recipient;
    }

    public void setRecipient(String recipient) {
        this.recipient = recipient;
    }

    public long getAmount() {
        return amount;
    }

    public void setAmount(long amount) {
        this.amount = amount;
    }

    @Override
    public String toString() {
        return "Transaction{" +
                "sender='" + sender + '\'' +
                ", recipient='" + recipient + '\'' +
                ", amount=" + amount +
                '}';
    }
}
